package com.ysd.lis.controller.cri;


import com.ysd.common.Result;
import com.ysd.lis.controller.pub.BaseController;
import com.ysd.lis.dto.cri.CriCommDto;
import com.ysd.lis.entity.cri.CriTemplateDesc;
import com.ysd.lis.request.cri.CriCommParam;
import com.ysd.lis.service.cri.CriTemplateDescService;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

/**
 * <p>
 * 前端控制器
 * </p>
 *
 * @author prs
 * @since 2025-02-20
 */
@RestController
@RequestMapping("/lis/cri/criTemplate")
public class CriTemplateDescController extends BaseController {

    @Autowired
    CriTemplateDescService criTemplateDescService;

    @ApiOperation("不分页查询")
    @GetMapping("/findCriTemplateList")
    public Result findCriTemplateList(CriCommParam param) {
        return criTemplateDescService.findCriTemplateList(param);
    }

    @ApiOperation("分页查询")
    @GetMapping("/findCriTemplatePageList")
    public Result findCriTemplatePageList(CriCommParam param) {
        return criTemplateDescService.findCriTemplatePageList(param);
    }

    @ApiOperation("新增")
    @PostMapping("/addCriTemplate")
    public Result addCriTemplate(@RequestBody CriTemplateDesc sysCriTemplate) {
        return criTemplateDescService.addCriTemplate(sysCriTemplate);
    }

    @ApiOperation("修改")
    @PostMapping("/editCriTemplate")
    public Result editCriTemplate(@RequestBody CriTemplateDesc supplier) {
        return criTemplateDescService.editCriTemplate(supplier);
    }

    @ApiOperation("批量删除")
    @PostMapping("/batchDeleteCriTemplate")
    public Result batchDeleteCriTemplate(@RequestBody CriCommDto dto) {
        return criTemplateDescService.batchDeleteCriTemplate(dto);
    }

}
